#ifndef ROSTHREAD_H
#define ROSTHREAD_H

#include <QThread>
#include <ros/ros.h>


class RosThread : public QThread
{
    Q_OBJECT
public:
    explicit RosThread(QObject *parent = nullptr);
    ~RosThread();

    void run() override; // 线程主循环
    void shutdown();     // 关闭ROS节点

private:
    ros::NodeHandle nh_;
    ros::Subscriber map_sub_;
    bool is_running_;
};

#endif // ROSTHREAD_H
